
i=["北京","上海","广东"]
省会=['北京',  '天津', '上海', "重庆",'呼和浩特',"广东",'南宁','拉萨','银川','乌鲁木齐','香港', '澳门','石家庄','太原','沈阳','长春', '哈尔滨','南京', '杭州','合肥','福州', '南昌','济南', '郑州','武汉', '长沙', '广州', '海口', '成都','贵阳', '昆明','西安', '兰州','西宁',  '台北']
for  a in  省会:
    if a not in i:
        i.append(a)
# print(i)
gd=i.pop(2)
i.insert(1,gd)
print(i)

gdp=[36710.36,35427.10,29863.23,29667.39,27665.36,27650.45,27620.38,25369.20]
总和=int(sum(gdp))
print("总和：",总和)
a=int(sum(gdp)/8)
print("平均值:",a)









